package hdp.tools;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class tool {
	HttpServletRequest req;
	HttpServletResponse resp;

	public boolean isNull(String s) {
		return req.getParameter(s) == null;
	}

	public Integer getInt(String s) {
		if (!isNull(s)) {
			return Integer.parseInt(req.getParameter(s));

		}
		return null;
	}

	public String getString(String s) {
		if (!isNull(s)) {
			return req.getParameter(s);

		}
		return null;
	}

}
